<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlertTableMembers1 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('members', function(Blueprint $table)
        {
            $table->unsignedInteger('token_end')->after('token')->nullable()->comment('token的有效期');
            $table->tinyInteger('zhima')->after('token_end')->defualt(0)->comment('芝麻认证 1 认证成功 0 未认证');
            $table->tinyInteger('idcard')->after('token_end')->defualt(0)->comment('身份证认证 1 认证成功 0 未认证');
            $table->tinyInteger('picture')->after('token_end')->defualt(0)->comment('照片认证 0未认证 1审核中 2认证成功');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('members', function(Blueprint $table)
        {
            $table->dropColumn('token_end');
            $table->dropColumn('zhima');
            $table->dropColumn('idcard');
            $table->dropColumn('picture');
        });
    }
}
